﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MonitorWall
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            showOnMonitor(1);//index=1
        }
        
        	private void showOnMonitor(int showOnMonitor)
	        {
                    Screen[] sc;
                    sc = Screen.AllScreens;
                    if (showOnMonitor >= sc.Length)
                    {
                        showOnMonitor = 0;
                    }
                    this.StartPosition = FormStartPosition.Manual;
                    this.Location = new Point(sc[showOnMonitor].Bounds.Left, sc[showOnMonitor].Bounds.Top);
                    // If you intend the form to be maximized, change it to normal then maximized.
                    this.WindowState = FormWindowState.Normal;
                    this.WindowState = FormWindowState.Maximized;
	        }

    }
}
